package com.zxy.controlcenter.modular.system.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author 周徐阳
 * @since 2019-09-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("cc_purview")
@ApiModel(value = "Purview对象", description = "")
public class Purview extends Model<Purview> {

    private static final long serialVersionUID = -7283432007419203104L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "权限名")
    @TableField("purview_name")
    private String purviewName;

    @ApiModelProperty(value = "权限类型 1:菜单 2:按钮")
    @TableField("purview_type")
    private Integer purviewType;

    @ApiModelProperty(value = "父级权限 第一级权限为-1")
    @TableField("parent_level")
    private Long parentLevel;

    @ApiModelProperty(value = "链接地址")
    @TableField("url")
    private String url;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Long createTime;

    @ApiModelProperty(value = "创建人")
    @TableField("admin_id")
    private Long adminId;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
